from django.db import models

# Create your models here.


class ATOP_CD_ATOM(models.Model):
    """原子操作信息表"""
    atom_id = models.CharField(max_length=32, unique=False, null=False)
    atom_name = models.CharField(max_length=128, unique=False, null=False)
    atom_desc = models.TextField(max_length=1024, null=False)
    modules = models.CharField(max_length=32, unique=False, null=False)
    tag_str = models.CharField(max_length=256, unique=False, null=False)
    enable = models.CharField(max_length=1, unique=False, null=False)
    script_type = models.CharField(max_length=32, unique=False, null=False)
    script_content = models.CharField(max_length=64, unique=False, null=False)
    create_by = models.CharField(max_length=32, unique=False, null=False)
    create_time = models.DateTimeField(unique=False, null=False, auto_now_add=True)
    modify_by = models.CharField(max_length=32, unique=False, null=False)
    modify_time = models.DateTimeField(unique=False, null=False, auto_now_add=True)
    version = models.IntegerField(unique=False, null=False)
    is_current = models.CharField(max_length=1, unique=False, null=False)
    province = models.CharField(max_length=32, null=False)

    class Meta:
        db_table = 'ATOP_CD_ATOM'


class ATOP_CD_ATOM_PARAM(models.Model):
    """原子操作参数定义表"""
    atom_id = models.CharField(max_length=32, unique=False, null=False)
    atom_version = models.IntegerField(unique=False, null=False)
    param_id = models.CharField(max_length=32, unique=False, null=False)
    param_name = models.CharField(max_length=128, unique=False, null=False)
    param_type = models.TextField(max_length=1024, unique=False, null=False)
    is_manual = models.CharField(max_length=1, unique=False, null=False)
    is_password = models.CharField(max_length=1, unique=False, null=False)
    default_value = models.CharField(max_length=128, unique=False, null=False)

    class Meta:
        db_table = 'ATOP_CD_ATOM_PARAM'
